import {
	getRequest,
	postRequest,
	deleteRequest
} from '../request.js'

export const create = (params) => {
	return postRequest('/vacancy/addVacancy', params)
}

export const pageSearch = (params) => {
	return getRequest('/vacancy/page/search', params)
}

export const pageSearchOther = (params) => {
	return getRequest('/vacancy/page/getOther', params)
}

export const resumeList = (params) => {
	return getRequest('/resume/list', params)
}

export const detail = (params) => {
	return getRequest('/vacancy/getDetail', params)
}

export const applyList = (params) => {
	return getRequest('/apply/list', params)
}

export const applyListByUser = (params) => {
	return getRequest('/apply/listByUser', params)
}


export const personalResume = (params) => {
	return getRequest('/resume/personal', params)
}

export const confirmResume = (params) => {
	return getRequest('/apply/confirmResume', params)
}

export const checkApplied = (params) => {
	return getRequest('/apply/check', params)
}

export const applyJob = (params) => {
	return postRequest('/apply', params)
}

export const reviewApply = (data) => {
	return postRequest('/apply/review', data)
}

export const getApplyCount = (params) => {
	return getRequest('/apply/count', params)
}

// 新增岗位管理相关接口
export const save = (params) => {
	return postRequest('/vacancy/save', params)
}

export const deleteVacancy = (params) => {
	return postRequest('/vacancy/delete', params)
}

export const getCompanyVacancies = (params) => {
	return getRequest('/vacancy/company/list', params)
}

export const getVacancyApplies = (params) => {
	return getRequest('/vacancy/applies', params)
}

// 收藏相关接口
export const collect = (params) => {
	return postRequest('/collect', params)
}

export const collectList = (params) => {
	return getRequest('/collect/list', params)
}

export const deleteCollect = (params) => {
	return postRequest('/collect/deleteCollect', params)
}

export const checkCollect = (params) => {
	return getRequest('/collect/check', params)
}

export const changeCollect = (params) => {
	return postRequest('/collect/changeCollected', params)
}
